🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / car / src / main / kotlin / org / meshtastic / feature / car / service / MeshtasticCarSession.kt
Displaying Raw • Download
feature/car/src/main/kotlin/org/meshtastic/feature/car/service/MeshtasticCarSession.kt 4e15ef1c7f68f8c683fe8b7ff741a5167e154d2e (4e15ef1c) Text, 3.04 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.car.service
Tff7b72import T7ee787android.content.Intent
Tff7b72import T7ee787android.content.res.Configuration
Tff7b72import T7ee787androidx.car.app.Screen
Tff7b72import T7ee787androidx.car.app.Session
Tff7b72import T7ee787androidx.lifecycle.DefaultLifecycleObserver
Tff7b72import T7ee787androidx.lifecycle.LifecycleOwner
Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.Dispatchers
Tff7b72import T7ee787kotlinx.coroutines.SupervisorJob
Tff7b72import T7ee787kotlinx.coroutines.cancel
Tff7b72import T7ee787kotlinx.coroutines.flow.emptyFlow
Tff7b72import T7ee787org.koin.core.component.KoinComponent
Tff7b72import T7ee787org.koin.core.component.inject
Tff7b72import T7ee787org.meshtastic.feature.car.alerts.EmergencyHandler
Tff7b72import T7ee787org.meshtastic.feature.car.screens.HomeScreen
Tff7b72import T7ee787org.meshtastic.feature.car.util.CrashlyticsCarTagger
Tff7b72class T56d364MeshtasticCarSession Tb4b4b4:
Te6edf3SessionTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3KoinComponent Tb4b4b4{
Tff7b72private Tff7b72val Te6edf3crashlyticsCarTaggerTb4b4b4: Te6edf3CrashlyticsCarTagger Tff7b72by Te6edf3injectTb4b4b4(Tb4b4b4)
Tff7b72private Tff7b72val Te6edf3stateCoordinatorTb4b4b4: Te6edf3CarStateCoordinator Tff7b72by Te6edf3injectTb4b4b4(Tb4b4b4)
Tff7b72private Tff7b72val Te6edf3emergencyHandlerTb4b4b4: Te6edf3EmergencyHandler Tff7b72by Te6edf3injectTb4b4b4(Tb4b4b4)
Tff7b72private Tff7b72val Te6edf3conversationShortcutManagerTb4b4b4: Te6edf3ConversationShortcutManager Tff7b72by Te6edf3injectTb4b4b4(Tb4b4b4)
Tff7b72private Tff7b72val Te6edf3sessionScope Tff7b72= Te6edf3CoroutineScopeTb4b4b4(Te6edf3SupervisorJobTb4b4b4(Tb4b4b4) Tff7b72+ Te6edf3DispatchersTb4b4b4.Te6edf3MainTb4b4b4.Te6edf3immediateTb4b4b4)
Tff7b72override Tff7b72fun Td2a8ffonCreateScreenTb4b4b4(Te6edf3intentTb4b4b4: Te6edf3IntentTb4b4b4)Tb4b4b4: Te6edf3Screen Tb4b4b4{
Te6edf3crashlyticsCarTaggerTb4b4b4.Te6edf3setCarSessionTb4b4b4(Tff7b72trueTb4b4b4)
Te6edf3stateCoordinatorTb4b4b4.Te6edf3startTb4b4b4(Tb4b4b4)
Te6edf3conversationShortcutManagerTb4b4b4.Te6edf3startObservingTb4b4b4(Te6edf3sessionScopeTb4b4b4)
T8b949e// Emergency flow wired to emptyFlow() until emergency packet detection is implemented
Te6edf3emergencyHandlerTb4b4b4.Te6edf3startCollectingTb4b4b4(Te6edf3emptyFlowTb4b4b4(Tb4b4b4)Tb4b4b4)
Te6edf3lifecycleTb4b4b4.Te6edf3addObserverTb4b4b4(
Tff7b72object Tb4b4b4: T56d364DefaultLifecycleObserver Tb4b4b4{
Tff7b72override Tff7b72fun Td2a8ffonDestroyTb4b4b4(Te6edf3ownerTb4b4b4: Te6edf3LifecycleOwnerTb4b4b4) Tb4b4b4{
Te6edf3destroyTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tff7b72return Te6edf3HomeScreenTb4b4b4(Te6edf3carContextTb4b4b4, Te6edf3stateCoordinatorTb4b4b4, Te6edf3emergencyHandlerTb4b4b4)
Tb4b4b4}
Tff7b72override Tff7b72fun Td2a8ffonNewIntentTb4b4b4(Te6edf3intentTb4b4b4: Te6edf3IntentTb4b4b4) Tb4b4b4{
T8b949e// Deep link handling (e.g., open specific conversation from notification)
Tb4b4b4}
Tff7b72override Tff7b72fun Td2a8ffonCarConfigurationChangedTb4b4b4(Te6edf3newConfigurationTb4b4b4: Te6edf3ConfigurationTb4b4b4) Tb4b4b4{
T8b949e// Handle theme/density changes — templates auto-update
Tb4b4b4}
Tff7b72private Tff7b72fun Td2a8ffdestroyTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3conversationShortcutManagerTb4b4b4.Te6edf3stopObservingTb4b4b4(Tb4b4b4)
Te6edf3sessionScopeTb4b4b4.Te6edf3cancelTb4b4b4(Tb4b4b4)
Te6edf3emergencyHandlerTb4b4b4.Te6edf3stopCollectingTb4b4b4(Tb4b4b4)
Te6edf3stateCoordinatorTb4b4b4.Te6edf3destroyTb4b4b4(Tb4b4b4)
Te6edf3crashlyticsCarTaggerTb4b4b4.Te6edf3setCarSessionTb4b4b4(Tff7b72falseTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.4 - Generated in 0.03s